function selectProvince()
{
    var  classCode;
    var  classString ="";
    var  index;
    var  i,provinceCount;
    classString = document.Search.strProvince.value;
    index = document.Search.country.selectedIndex;
    classCode  = document.Search.country.options[index].value;
    if (classCode == "")
    {
      document.Search.province.length=1;
      document.Search.province.options[0].value="";
      document.Search.province.options[0].text="";
    }
    else
    {
      provinceCount = 0;
      prePos = -1;
      lastPos=0;
      i = 0;
        while (i < classString.length)
        {
          lastPos = classString.indexOf("|",i);
          if (lastPos > prePos)
          {
            tItem = classString.substring(prePos+1,lastPos);
            if (tItem.substring(0,2) == classCode)
            {
              tmpInt = tItem.indexOf("@",1);
              if (tmpInt > 0)
              provinceCount++;
            }
              prePos = lastPos;
            }
        i = lastPos + 1;
      }
      document.Search.province.length= provinceCount +1;
      i = 0;
      prePos  = -1;
      lastPos = 0;
      document.Search.province.options[0].value="";
      document.Search.province.options[0].text ="";
      cityIndex = 1;
      while (i < classString.length)
      {
          lastPos = classString.indexOf("|",i);
          if (lastPos > prePos)
          {
            tItem = classString.substring(prePos+1,lastPos);
            if (tItem.substring(0,2) == classCode)
            {
              tmpInt = tItem.indexOf("@",1);
              if (tmpInt > 0)
              {
                tItem0 = tItem.substring(0,tmpInt);
                tItem1 = tItem.substring(tmpInt+1);
                document.Search.province.options[cityIndex].value=tItem0;
                document.Search.province.options[cityIndex].text =tItem1;
                cityIndex++;
              }
            }
            prePos = lastPos;
          }
          i = lastPos + 1;
        }
    }
    return true;
}
